package com.hoshiicloud.payment.service;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.hoshiicloud.common.rpc.Response;
import com.hoshiicloud.payment.Payment;
import org.springframework.web.multipart.MultipartFile;

/**
 * <p>
 * 支付方式配置信息 服务类
 * </p>
 *
 * @author Mr.wu
 * @since 2019-05-13
 */
public interface PaymentService extends IService<Payment> {

    Payment getById(Long id);

    Payment getByParam(QueryWrapper queryWrapper);

    @Override
    boolean save(Payment entity);

    /**
     * @param entity
     * @param file
     * @return Response
     * @author: Mr.wu
     * @descripton: 新增支付配置和支付证书
     * @date: 10:12 2019/6/10
     */
    Response saveByCert(Payment entity, MultipartFile file);

    @Override
    boolean updateById(Payment entity);

    /**
     * @param entity
     * @param file
     * @return boolean
     * @author: Mr.wu
     * @descripton: 修改支付配置和支付证书
     * @date: 10:13 2019/6/10
     */
    Response updateByCert(Payment entity,MultipartFile file);

    @Override
    IPage<Payment> page(IPage<Payment> page, Wrapper<Payment> queryWrapper);

    boolean deleteById(Payment entity);
}
